<route lang="json5">
{
  meta: {
    auth: true,
  },
}
</route>

<template>
  <div class="">
    <div class="mockup-code w-max">
      <use-typed
        v-bind="{
          strings: [`<pre data-prefix='$'><code>一柯小白菜 √ </code></pre>`],
          typeSpeed: 1,
        }"
        ref="typedRef"
      >
        <pre data-prefix="$"><code>npm i --save lodash</code></pre>
        <pre data-prefix=">" class="text-warning"><code>installing...</code></pre>
        <pre data-prefix=">" class="text-success"><code>Done!</code></pre>
      </use-typed>
    </div>
    <a-button
      class="mt-6"
      @click="
        () => {
          typedRef.dispatch('reset')
        }
      "
    >
      Restart
    </a-button>
  </div>
</template>

<script lang="ts" setup>
const typedRef = ref()
</script>
